package com.wm.blog_admin.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wm.blog_admin.domain.RecommendDo;
import com.wm.blog_admin.query.TRecommendQuery;
import com.wm.blog_common.bean.QueryPage;
import com.wm.blog_common.entity.TRecommend;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 推荐 Mapper 接口
 * </p>
 *
 * @author 半卷流年
 * @since 2020-04-15
 */
public interface TRecommendMapper extends BaseMapper<TRecommend> {

    int maxOrderNum(@Param("adminId") Long adminId);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    Page<RecommendDo> recommendPage(@Param("page") QueryPage page, @Param("query") TRecommendQuery query);

    RecommendDo recommendMaxMinOrder(@Param("query") TRecommendQuery query);
}
